import type { ListResponseType } from '../global.type';

// 知识关系
export interface GetKnowledgeRelationshipParamsType {
	pageNum?: number;
	pageSize?: number;
	keyword?: string;
	displayType?: string;
}

export interface KnowledgeRelationshipItemType {
	id: string;
	relationCode?: string;
	relationName?: string;
	description?: string;
	displayType?: string;
	example?: string;
	exampleExplanation?: string;
}

export type GetKnowledgeRelationshipResponseType = ListResponseType<KnowledgeRelationshipItemType>;

// 获取知识点
export interface GetKnowledgeGraphParamsType {
	businessCode: string;
	businessType: number;
}

export interface KnowledgeGraphItemType {
	knowledgePoint: string;
	knowledgePointId: number;
	knowledgePointName: string;
	knowledgePointType: string;
}

export interface KnowledgeGraphNodeItemType {
	id: number;
	name: string;
	root?: boolean;
}

export interface KnowledgeGraphLinkItemType {
	id: number;
	source: number;
	target: number;
	relationType: string;
}

export interface GetKnowledgeGraphResponseType {
	nodes: KnowledgeGraphNodeItemType[];
	links: KnowledgeGraphLinkItemType[];
}

// 查询课程/课堂知识点详情
export interface GetKnowledgeDetailParamsType {
	businessType: number;
	knowledgeId: number;
}

export interface KnowledgeDetailItemType {
	lessonCode: string;
	lessonName: string;
	title: string;
	summary: string;
	startTime: number;
	endTime: number;
}

export type GetKnowledgeDetailResponseType = KnowledgeDetailItemType[];
